home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2514 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: informatik.tu-muenchen.de!ganterth
  2. From: ganterth@mathematik.tu-muenchen.de (Thomas Ganter)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Removing a patch - solved?
  5. Date: 01 Feb 1996 12:43:51 GMT
  6. Organization: Math. Institut der TU Muenchen
  7. Distribution: world
  8. Message-ID: <1996Feb1.134351@mathematik.tu-muenchen.de>
  9. References: <1996Jan22.150212.23377@ludens> <4e1p58$4l2@misery.millcomm.com> <815.6602T1142T756@norconnect.no> <1433.6603T1100T1439@stud.cs.uit.no> <slrn4h17b3.5rq.ing9435@xerxes.to.mh.se>
  10. NNTP-Posting-Host: sunbulirsch8.mathematik.tu-muenchen.de
  11. X-newsreader: xrn 7.00
  12.  
  13. > Wouldn't this work:
  14. >
  15. > patch:
  16. >    addq.l    #1,counter
  17. >
  18. >    ; Patch stuff
  19. >
  20. >exit_patch:
  21. >    subq.l    #1,counter
  22. >    rts
  23. >
  24. >
  25. >RemovePatch()
  26. >{
  27. >    Forbid();
  28. >    while(has_function_been_repacthed())
  29. >    {
  30. >        Permit();
  31. >        Delay_or_notify_user();
  32. >        Forbid();
  33. >    }
  34. >
  35. >    Restore_old_patch();
  36.  
  37. No, but, as we already know, there is no way to simply
  38. resore the old patch since our patch allready might have been
  39. 'overpatched' resulting in the newer patch jumping into out
  40. unloaded patch resulting in a potentially dangerous situation.
  41.  
  42. >    while(counter > 0)
  43. >    {
  44. >        Permit();
  45. >        Delay_or_notify_user();
  46. >        Forbid();
  47. >    }
  48. >    Permit();
  49. >    unload_patch_code();
  50. >}    
  51.  
  52.                         - Thomas
  53.  
  54. ------------------------------------------------------------------------------
  55.   Thomas Ganter            Student der Mathematik
  56.   Postweg 3            email: ganterth@mathematik.tu-muenchen.de
  57.   83209 Prien am Chiemsee    FAX  : (0) 8051 - 63179
  58.   Bavaria, Germany        Phone: (0) 8051 - 61895 & 62054
  59. ------------------------------------------------------------------------------
  60.   Amiga Developer (ETG 249)  -  A3000/14Megs/550MB HD/PicassoII
  61. ------------------------------------------------------------------------------
  62.  
  63.   Mathematicians are like Frenchmen: whenever you say something to them,
  64.   they translate it into their own language, and at once it is something
  65.   entirely different.                     J. W. v. Goethe
  66.  
  67.